<template>
  <div class="dashboard-editor-container">
    <el-container>
      <el-aside width="25%">
        <el-timeline>
          <el-timeline-item timestamp="2018/4/12" placement="top">
            <el-card>
              <h4>系统修改日志时间轴1</h4>
              <p>开始制作系统首页 - cui</p>
            </el-card>
          </el-timeline-item>
        </el-timeline>
      </el-aside>
      <el-main>
        <el-row :gutter="8">
          <el-col :span="8">
            <el-card shadow="always">
              <div slot="header" class="clearfix">
                <span>用户总数</span>
              </div>
              <div class="text item">
                {{ totalUserCount }}人
              </div>
            </el-card>
          </el-col>
          <el-col :span="8">
            <el-card shadow="always">
              <div slot="header" class="clearfix">
              <span>用户总余额</span>
            </div>
              <div class="text item">
                {{ totalUserPrice }}元
              </div>
            </el-card>
          </el-col>
          <el-col :span="8">
            <el-card shadow="always">
              <div slot="header" class="clearfix">
              <span>待审任务</span>
            </div>
              <div class="text item">
                {{ totalNotCheckTaskLog}}条
              </div>
            </el-card>
          </el-col>
        </el-row>
      </el-main>
    </el-container>




  </div>
</template>

<script>


import request from "../utils/request";

export default {
  name: 'Index',
  components: {
  },
  data() {
    return {
      totalUserCount : '',
      totalUserPrice : '',
      totalNotCheckTaskLog : '',
    }
  },
  created() {

    this.init();
  },
  methods: {
    init(){
      request('http://localhost:8080/init').then(res=>{
        this.totalUserCount = res.totalUserCount;
        this.totalUserPrice = res.totalUserPrice;
        this.totalNotCheckTaskLog = res.totalNotCheckTaskLog;
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard-editor-container {
  padding: 32px;
  background-color: rgb(240, 242, 245);
  position: relative;
  min-height: 600px;
}
</style>
